#include "StdAfx.h"
#include "NOR.h"
#include <iostream>

NOR NOR::cInstance( "NOR");

NOR::NOR(const char* szID )
	: Gate( szID )
{
}

NOR::NOR(void)
{
	notGate = new NOT();
	orGate = new OR();
	orGate->LinkOutputWith(notGate->GetInputForLink());
}


NOR::~NOR(void)
{
	delete notGate;
	delete orGate;
}

Input* NOR::GetInputForLink()
{
	return orGate->GetInputForLink();
}

void NOR::LinkOutputWith(Input* input)
{
	notGate->LinkOutputWith(input);
}

void NOR::Calculation()
{

}

Node* NOR::clone()
{
	return new NOR();
}